package logController;

import java.awt.Color;

/**
 * @date Apr. 19, 2012
 * @author Francisco J. Martínez
 * 
 */
public enum EnumMessageType {
	DEBUG_INFO, DEBUG_ERROR, INFO, ERROR, EVENT, EVENT_SUCCESS;

	public Color color() {
		Color res;
		switch (this) {
		case DEBUG_ERROR:
		case ERROR:
			res = Color.RED;
			break;
		case EVENT_SUCCESS:
			res = Color.GREEN;
			break;
		case DEBUG_INFO:
		case INFO:
			res = Color.ORANGE;
			break;
		default:
			res = Color.BLACK;
		}
		return res;
	}

	public boolean isDebug() {
		return this.equals(EnumMessageType.DEBUG_ERROR)
				|| this.equals(EnumMessageType.DEBUG_INFO);
	}
}
